$execute if data entity @s Inventory[{Slot:$(index)b}].components."minecraft:custom_data"{type:"arrow"} run return run function dab:system/arrow_bundle/storage/pickup_arrow/loop_break {index:$(index)}

#reloop
function dab:system/arrow_bundle/storage/pickup_arrow/pickup_reloop